package com.ccb.p4.config;

import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>功能描述：TODO </p>
 * <p>修订记录</p>
 *
 * @Author xianghui.zh
 * @Version 1.0 2022/1/7
 **/
@Configuration
@MapperScan("com.ccb.p4.mapper")
public class MybatisPlusConfig {
    // 配置 mp 逻辑删除插件
    @Bean
    public ISqlInjector sqlInjector() {
        return new LogicSqlInjector();
    }

    // 添加分页插件
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

}
